

data = load('data');
Y = zeros(size(data,1),1);
for i = 1:size(data,1)
    Y(i)= 2 + 0.1 * data(i,2) + 0.5 *data(i,3) + 2*data(i,4)+ 0.9*data(i,5)+8*data(i,6)+0.1*data(i,7)+0.7*data(i,8);
endfor;

X = data(:,[2:8]);

data = [Y X];

save newdata  data ;
